//const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
//
///**
// * Metro configuration
// * https://reactnative.dev/docs/metro
// *
// * @type {import('@react-native/metro-config').MetroConfig}
// */
//const config = {};
//
//module.exports = mergeConfig(getDefaultConfig(__dirname), config);


const { getDefaultConfig} = require('@react-native/metro-config');
/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('@react-native/metro-config').MetroConfig}
 */

module.exports = (() => {
	const config = getDefaultConfig(__dirname);

	const {transformer, resolver} = config;

	config.transformer = {
		...transformer,
		babelTransformerPath: require.resolve('react-native-svg-transformer'),
	};
	config.resolver = {
		...resolver,
		assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'),
		sourceExts: [...resolver.sourceExts, 'svg'],
	};

	return config;
})();
